home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
mcwint20.zip
/
WTUTOR20.C
< prev
next >
Wrap
Text File
|
1988-01-11
|
43KB
|
1,234 lines
#define USE_LOCAL
#define TRUE 1
#define FALSE 0
#define ENTER 13
#define ESCAPE 27
#define RGTARROW 77
#define LFTARROW 75
#define HIDDEN_CURSOR 8192
#include <stdio.h>
#include <conio.h>
#include <alloc.h>
#include <color.h>
#include <w1.h>
#include <windprot.h>
void show_initial_screen(void);
void loop_the_loop(void);
void display_main_menu(void);
void display_window_menu(int *);
void display_misc_menu(int *);
void show_initwindow(int);
void show_makewindow(int);
void show_borders(void);
void show_removewindow(int);
void show_titlewindow(int);
void show_scrollwindow(int);
void show_specialeffects(int);
void show_maxwndw(int);
void show_qwik21(int);
void show_programming(int);
void show_ending(void);
void show_getstring(int);
void show_getinteger(int);
void show_getmenu(int);
void show_wsound(int);
void show_wsleep(int);
void show_introduction(int);
void show_autodemo(void);
int m_special(int,int*);
void main(void);
int s_row[14] = {2,2,2,2,2,8,14,20,20,20,20,20,14,8};
int s_col[14] = {6,21,36,51,66,66,66,66,51,36,21,6,6,6};
int n_rows = 5;
int n_cols = 10;
int auto_menu = 0; /* auto menu flag */
int m_item = 0;
char *stra[33] = {
" WINDOWS and QUICK WRITE UTILITIES FOR C ",
" Version 2.0 ",
" (C) 87,88 Michael G. Mlachak ",
" (C) 87,88 Brian L. Cassista ",
" Fast - Small - Easy ",
" C H E A P ",
" ",
" Supports many modes and ",
" many monitors ",
" To register a copy send $55 to the ",
" above address. Registration includes ",
" complete source code and printed manual. ",
" Libraries are available for Turbo-C, ",
" Microsoft 4.0 and 5.0. All memory models ",
" are supported. If you do not wish to ",
" become a registered user libraries for a ",
" specific model and compiler can be ",
" obtained for $10 each. A printed bound ",
" manual can also be obtained for $10. ",
" Michael G. Mlachak ",
" 4318 Stewart Court ",
" East Chicago, IN. ",
" 46312 ",
" WORK: (312)-407-5343 ",
" HOME: (219)-397-8952 ",
" CIS : 76327,1410 ",
" Brian L. Cassista ",
" 165 South Floyd Lane ",
" Chicago Hts, IL. ",
" 60411 ",
" WORK: (312)-407-5358 ",
" HOME: (312)-756-3567 "
};
char *strb[2] = {
" Windows are as easy as 1, 2, 3....... ",
" The rest of this DEMO is menu driven. ",
};
char *main_menu[10] = {
"General",
"Windows",
"Screen",
"Misc.",
"Auto Demo",
"Exit Demo",
" MC-WINDOWS (TURBO 1.0 DEMO)═════════════ <- -> - Select Enter-Accept ",
" ",
""
};
char *strc[8] = {
"initwindow",
" ",
"FORMAT: void initwindow (int windowattribute,",
" int clear_screen)",
"Initwindow initializes several variables required by the",
"windowing package, as well as selecting the foreground and",
"background colors of the initial screen display. Initwindow",
"must be called before using any of the other functions. "};
char *strd[17] = {
"makewindow",
" ",
"FORMAT: void makewindow (int row,col,rows,cols,wattr,battr,",
" BORDERS brdrsel);",
" ",
"Makewindow puts a new blank window on the display. The window starts",
"at the upper left corner (row,col) and extends for a number of rows",
"and columns (rows,cols). If a border exists, the actual dimensions",
"of the TURBO C window will be 2 less than indicated in the makewindow",
"statement. The border can be one of the following: (SEE w1.h)",
" ",
" nobrdr - just window evensolidbrdr - evenly solid",
" blankbrdr - blank spaces thinsolidbrdr - thin solid line",
" singlebrdr - single line lhatchbrdr - light hatch",
" doublebrdr - double line mhatchbrdr - medium hatch",
" mixedbrdr - single/double hhatchbrdr - heavy hatch",
" solidbrdr - solid userbrdr - user defined border"};
char *stre[18] = {
"removewindow",
"FORMAT: void removewindow(void);",
" ",
"Removewindow removes the last window",
"remaining on the screen from the",
"makewindow function.",
"remove_windows",
"FORMAT: void remove_windows(int);",
" ",
"Remove_windows removes the number of",
"windows specified. It checks to see ",
"if there are that amount to remove. ",
"remove_all_windows",
"FORMAT: void remove_all_windows(void);",
" ",
"Remove_all_windows removes all of ",
"the currently displayed windows from",
"the makewindow function."};
char *strf[2] = {
"See if your BIOS gives you flicker",
"when your screen rolls down next ..."};
char *strg[19] = {
" ",
" scrollwindow",
" ",
" ",
"FORMAT: void scrollwindow (byte rowbegin,rowend byte; DIRTYPE dir);",
"",
"The BIOS scroll that was used for this call may have worked just fine",
"for this window. However, if your screen just had some bad flicker ",
"as it was scrolling down, your BIOS is not flicker-free. To keep the",
"display flicker-free, to work on other video pages or an EGA, then",
"you will need this function. The upward scroll, used scrollwindow, ",
"so no flicker was seen then. It also scrolls partial windows.",
" ",
"The direction of the scroll can be any of the following:(SEE w1.h)",
" ",
" 'up' - to scroll up",
" 'down' - to scroll down",
" ",
" "};
char *strh[7] = {
"titlewindow",
"FORMAT: void titlewindow(justify,title,attr);",
" enum DIRTYPE justify; char title[80]",
" int attr ",
"Titlewindow places a title in the top border",
"of the current window. Justify permits left,",
"center or right justification of the title."};
char *stri[17] = {
"There are now two special effects that can",
"enhance the window display:",
" zoomeffect - emulates the MACINTOSH.",
" shadoweffect - places a left or right",
" shadow underneath the menu.",
"These global variables can be placed anywhere",
"in your program. zoomeffect is INT while",
"shadoweffect is of DIRTYPE.",
"CGA:",
"The CGA is self-regulating and controls the",
"zoom rate.",
"MDA and EGA:",
"These video cards are quite fast and need a",
"delay for the effect. A default value of 11",
"milliseconds is used in a global INT",
"named 'zoomdelay' and shouldn't need any",
"adjustment."};
char *strj[5] = {
" The maximum number of windows that",
" may be on the screen at any one time",
" is specified by the constant",
" \"MAXWNDW\".The compiled library uses",
" this value so do NOT change it......"};
char *strk[9] = {
" In addition to windows, there are 13 powerful",
" Qwik-Write screen functions you can use:",
" qwritelv qattr qpage",
" qwrite qattrc qwritepage",
" qwritec gotorc cursorchange",
" qfillc qstore ",